#pragma once

#include <Ogre.h>
#include "BtOgrePG.h"
#include "BtOgreGP.h"
#include "BtOgreExtras.h"
#include "DefaultCube.h"

using namespace Ogre;

class BaseLauncher
{
public:
	BaseLauncher(Ogre::String name, Ogre::SceneManager* sceneMgr, Ogre::SceneNode* parentNode, Ogre::Vector3 pPos, Ogre::Quaternion orientation);
	~BaseLauncher(void);

	void updateLauncher(double timeSinceLastFrame);
	void updateTarget(Ogre::Vector3 target);
	void fireLauncher();
	void changeDebugVisibility();

	Ogre::SceneNode*			m_LauncherNode;
	Ogre::SceneNode*			m_ParentNode;
	Ogre::SceneManager*			m_pSceneMgr;

private:

	Ogre::Entity*				m_LauncherEntity;

	Ogre::Timer*				m_LauncherTimer;
	Ogre::Vector3				m_LauncherTarget;

	bool						m_CanFire;
	float						m_CanFireDelay;
	Ogre::ManualObject *		m_Circle;
	Ogre::ManualObject *		m_Line;
	Ogre::Entity*				m_LineEntity;
	Ogre::SceneNode*			m_FireLineNode;
	DefaultRectangle*			m_FireLineCube;
};



